// 时空回音 - 扩展故事数据
// 史诗级多元宇宙冒险 - 5章完整剧情

class ExtendedStoryData {
    constructor() {
        this.storyData = this.createExtendedStory();
    }

    createExtendedStory() {
        return {
            // 第1章：初次觉醒 - 扩展版
            chapter1: {
                title: "第一章：时空的第一次颤抖",
                scenes: {
                    // 新增起始分支
                    "1": {
                        id: "chapter1_scene1",
                        title: "深夜的实验室",
                        content: "午夜时分，量子物理实验室内只有你一个人。突然，中央的量子共振装置开始发出诡异的蓝光。设备的指示灯闪烁不停，仿佛在传递某种讯息。你意识到，这不是普通的设备故障...",
                        image: "images/lab_night.svg",
                        choices: [
                            {
                                id: "choice1_1",
                                text: "立即检查设备数据",
                                leads_to: "chapter1_scene2a",
                                stats: { scientific: 1 }
                            },
                            {
                                id: "choice1_2",
                                text: "靠近设备仔细观察",
                                leads_to: "chapter1_scene2b",
                                stats: { explorer: 1 }
                            },
                            {
                                id: "choice1_3",
                                text: "启动安全协议",
                                leads_to: "chapter1_scene2c",
                                stats: { survival: 1 }
                            },
                            {
                                id: "choice1_4",
                                text: "凭直觉用手触摸设备",
                                leads_to: "chapter1_scene2d",
                                stats: { intuitive: 1 }
                            },
                            {
                                id: "choice1_5",
                                text: "尝试与设备'对话'",
                                leads_to: "chapter1_scene2e",
                                stats: { empathetic: 1 }
                            }
                        ]
                    },

                    // 科学路线分支
                    "2a": {
                        id: "chapter1_scene2a",
                        title: "数据的秘密",
                        content: "你迅速调出设备的实时数据。量子场强度波动呈现出完美的斐波那契螺旋模式，这种自然界的黄金比例竟然出现在人工量子场中！更令人震惊的是，数据显示这个模式正在与宇宙背景辐射产生共振...",
                        image: "images/data_screen.svg",
                        choices: [
                            {
                                id: "choice2a_1",
                                text: "深入分析共振模式",
                                leads_to: "chapter1_scene3a",
                                stats: { scientific: 2 }
                            },
                            {
                                id: "choice2a_2",
                                text: "尝试复制这个模式",
                                leads_to: "chapter1_scene3b",
                                stats: { scientific: 1, explorer: 1 }
                            },
                            {
                                id: "choice2a_3",
                                text: "立即保存所有数据",
                                leads_to: "chapter1_scene3c",
                                stats: { scientific: 1, survival: 1 }
                            }
                        ]
                    },

                    // 探索路线分支
                    "2b": {
                        id: "chapter1_scene2b",
                        title: "蓝光的呼唤",
                        content: "当你靠近设备时，蓝光变得更加明亮，仿佛在回应你的存在。你感到一种奇特的拉力，不是物理上的，而是精神层面的。光芒中似乎隐藏着某种智慧，某种古老而又超越时代的存在...",
                        image: "images/blue_glow.svg",
                        choices: [
                            {
                                id: "choice2b_1",
                                text: "伸手触摸光芒",
                                leads_to: "chapter1_scene3d",
                                stats: { explorer: 2 }
                            },
                            {
                                id: "choice2b_2",
                                text: "尝试与光芒沟通",
                                leads_to: "chapter1_scene3e",
                                stats: { explorer: 1, empathetic: 1 }
                            },
                            {
                                id: "choice2b_3",
                                text: "保持距离观察",
                                leads_to: "chapter1_scene3f",
                                stats: { explorer: 1, survival: 1 }
                            }
                        ]
                    },

                    // 安全路线分支
                    "2c": {
                        id: "chapter1_scene2c",
                        title: "紧急协议启动",
                        content: "你按下紧急关闭按钮，但令人困惑的是，设备并没有关闭。相反，蓝光变得更加强烈，仿佛在抗议你的干预。实验室的其他设备开始一一启动，创造出一个复杂的能量网络...",
                        image: "images/emergency_shutdown.svg",
                        choices: [
                            {
                                id: "choice2c_1",
                                text: "联系安全部门",
                                leads_to: "chapter1_scene3g",
                                stats: { survival: 2 }
                            },
                            {
                                id: "choice2c_2",
                                text: "手动断开电源",
                                leads_to: "chapter1_scene3h",
                                stats: { survival: 1, scientific: 1 }
                            },
                            {
                                id: "choice2c_3",
                                text: "疏散实验室",
                                leads_to: "chapter1_scene3i",
                                stats: { survival: 2, responsible: 1 }
                            }
                        ]
                    },

                    // 直觉路线分支
                    "2d": {
                        id: "chapter1_scene2d",
                        title: "第一次接触",
                        content: "你的手刚一接触设备表面，就感到一股电流般的感觉涌遍全身，但这不是痛苦，而是... 信息？记忆？你看到了闪光：其他实验室，其他科学家，其他世界。这台设备不是第一次被激活...",
                        image: "images/first_contact.svg",
                        choices: [
                            {
                                id: "choice2d_1",
                                text: "深入这些记忆",
                                leads_to: "chapter1_scene3j",
                                stats: { intuitive: 2 }
                            },
                            {
                                id: "choice2d_2",
                                text: "试图与其他意识沟通",
                                leads_to: "chapter1_scene3k",
                                stats: { intuitive: 1, empathetic: 1 }
                            },
                            {
                                id: "choice2d_3",
                                text: "立即断开连接",
                                leads_to: "chapter1_scene3l",
                                stats: { intuitive: 1, survival: 1 }
                            }
                        ]
                    },

                    // 共情路线分支
                    "2e": {
                        id: "chapter1_scene2e",
                        title: "无声的对话",
                        content: "你轻声对设备说话，感觉有些愚蠢，但突然间，蓝光开始按照你的话语节拍脉动。它在回应你！这不是冰冷的机器，而是某种有意识的存在。光芒中传来温和的情感波动，好奇、友善，还有... 孤独？",
                        image: "images/communication.svg",
                        choices: [
                            {
                                id: "choice2e_1",
                                text: "询问它来自哪里",
                                leads_to: "chapter1_scene3m",
                                stats: { empathetic: 2 }
                            },
                            {
                                id: "choice2e_2",
                                text: "安慰它的孤独感",
                                leads_to: "chapter1_scene3n",
                                stats: { empathetic: 2, compassionate: 1 }
                            },
                            {
                                id: "choice2e_3",
                                text: "问它需要什么帮助",
                                leads_to: "chapter1_scene3o",
                                stats: { empathetic: 1, helpful: 1 }
                            }
                        ]
                    },
                    
                    // 添加缺失的第1章第3层场景
                    "3a": {
                        id: "chapter1_scene3a",
                        title: "科学的发现",
                        content: "通过详细的数据分析，你发现了时空波动的规律。这一发现将改变人类对时间和空间的理解。你决定将这一发现公之于众，造福全人类。",
                        image: "images/scientific_discovery.svg",
                        choices: [
                            {
                                id: "choice3a_1",
                                text: "继续研究深入分析",
                                leads_to: "chapter2_scene1",
                                stats: { scientific: 2, dedication: 1 }
                            },
                            {
                                id: "choice3a_2",
                                text: "发表初步研究结果",
                                leads_to: "chapter2_scene1",
                                stats: { scientific: 1, fame: 1 }
                            }
                        ]
                    },
                    
                    "3b": {
                        id: "chapter1_scene3b",
                        title: "时空门户",
                        content: "当你尝试重现现象时，一个稳定的时空门户打开了。你成为了第一个时空旅行者，开启了人类探索多元宇宙的新纪元。",
                        image: "images/portal_opened.svg",
                        choices: [
                            {
                                id: "choice3b_1",
                                text: "踏入门户探索",
                                leads_to: "chapter2_scene1",
                                stats: { explorer: 2, courage: 1 }
                            },
                            {
                                id: "choice3b_2",
                                text: "先研究门户的原理",
                                leads_to: "chapter2_scene1",
                                stats: { scientific: 1, cautious: 1 }
                            }
                        ]
                    },
                    
                    "3c": {
                        id: "chapter1_scene3c",
                        title: "数据存档",
                        content: "你的谨慎悰度确保了所有关键数据的安全保存。这些数据将成为未来研究的宝贵财富，为人类的科技进步奠定基础。",
                        image: "images/data_archive.svg",
                        choices: [
                            {
                                id: "choice3c_1",
                                text: "分享数据给同行",
                                leads_to: "chapter2_scene1",
                                stats: { collaborative: 2 }
                            },
                            {
                                id: "choice3c_2",
                                text: "继续私下研究",
                                leads_to: "chapter2_scene1",
                                stats: { independent: 2 }
                            }
                        ]
                    },
                    
                    "3d": {
                        id: "chapter1_scene3d",
                        title: "能量融合",
                        content: "你与蓝光的接触引发了一场意想不到的能量融合。你的意识开始扩展，能够感知到平时无法察觉的维度。",
                        image: "images/energy_fusion.svg",
                        choices: [
                            {
                                id: "choice3d_1",
                                text: "拥抱这种新能力",
                                leads_to: "chapter2_scene1",
                                stats: { transcendent: 2 }
                            },
                            {
                                id: "choice3d_2",
                                text: "尝试控制这种力量",
                                leads_to: "chapter2_scene1",
                                stats: { controlled: 2 }
                            }
                        ]
                    },
                    
                    "3e": {
                        id: "chapter1_scene3e",
                        title: "意念沟通",
                        content: "你成功地与蓝光中的智慧存在建立了沟通。它告诉你，它来自一个遥远的文明，一直在寻找能够理解它们的存在。",
                        image: "images/mind_communication.svg",
                        choices: [
                            {
                                id: "choice3e_1",
                                text: "询问它们的文明",
                                leads_to: "chapter2_scene1",
                                stats: { curious: 2 }
                            },
                            {
                                id: "choice3e_2",
                                text: "提供人类的帮助",
                                leads_to: "chapter2_scene1",
                                stats: { helpful: 2 }
                            }
                        ]
                    },
                    
                    "3f": {
                        id: "chapter1_scene3f",
                        title: "谨慎观察",
                        content: "你选择保持距离观察，记录下所有的异常现象。这种谨慎的做法让你获得了宝贵的第一手资料。",
                        image: "images/careful_observation.svg",
                        choices: [
                            {
                                id: "choice3f_1",
                                text: "整理观察结果",
                                leads_to: "chapter2_scene1",
                                stats: { methodical: 2 }
                            },
                            {
                                id: "choice3f_2",
                                text: "制定后续计划",
                                leads_to: "chapter2_scene1",
                                stats: { strategic: 2 }
                            }
                        ]
                    },
                    
                    // 添加缺失的第1章第3层场景 (g-o)
                    "3g": {
                        id: "chapter1_scene3g",
                        title: "安全团队介入",
                        content: "安全团队迅速赶到现场，他们对异常现象进行了专业评估。队长告诉你，这种能量读数前所未见，需要立即采取控制措施。但你注意到，设备似乎对他们的存在有所反应。",
                        image: "images/security_team.svg",
                        choices: [
                            {
                                id: "choice3g_1",
                                text: "配合安全团队的行动",
                                leads_to: "chapter2_scene1",
                                stats: { cooperative: 2, cautious: 1 }
                            },
                            {
                                id: "choice3g_2",
                                text: "坚持继续研究",
                                leads_to: "chapter2_scene1",
                                stats: { determined: 2, scientific: 1 }
                            },
                            {
                                id: "choice3g_3",
                                text: "建议联合研究",
                                leads_to: "chapter2_scene1",
                                stats: { diplomatic: 2, collaborative: 1 }
                            }
                        ]
                    },
                    
                    "3h": {
                        id: "chapter1_scene3h",
                        title: "电源断开",
                        content: "你成功断开了主电源，但令人惊讶的是，设备并没有停止工作。它似乎有自己的能源供应，或者已经与某种更根本的能量源建立了连接。蓝光变得更加纯净，仿佛摆脱了技术限制。",
                        image: "images/power_disconnect.svg",
                        choices: [
                            {
                                id: "choice3h_1",
                                text: "研究设备的能源来源",
                                leads_to: "chapter2_scene1",
                                stats: { scientific: 2, curious: 1 }
                            },
                            {
                                id: "choice3h_2",
                                text: "尝试物理方式阻止",
                                leads_to: "chapter2_scene1",
                                stats: { practical: 2, forceful: 1 }
                            },
                            {
                                id: "choice3h_3",
                                text: "观察设备的新状态",
                                leads_to: "chapter2_scene1",
                                stats: { observant: 2, patient: 1 }
                            }
                        ]
                    },
                    
                    "3i": {
                        id: "chapter1_scene3i",
                        title: "紧急疏散",
                        content: "你触发了实验室的紧急疏散程序。警报声响彻整个建筑，人们开始有序撤离。但当你最后看向设备时，它的光芒似乎在向你告别，传达着一种深深的遗憾和不舍。",
                        image: "images/emergency_evacuation.svg",
                        choices: [
                            {
                                id: "choice3i_1",
                                text: "坚持完成疏散",
                                leads_to: "chapter2_scene1",
                                stats: { responsible: 2, safety_oriented: 1 }
                            },
                            {
                                id: "choice3i_2",
                                text: "最后一次接触设备",
                                leads_to: "chapter2_scene1",
                                stats: { brave: 2, curious: 1 }
                            },
                            {
                                id: "choice3i_3",
                                text: "记录设备的最后状态",
                                leads_to: "chapter2_scene1",
                                stats: { methodical: 2, scientific: 1 }
                            }
                        ]
                    },
                    
                    "3j": {
                        id: "chapter1_scene3j",
                        title: "记忆深潜",
                        content: "你选择深入那些不属于你的记忆。你看到了无数个平行世界中的科学家们，他们都在研究类似的设备。有些成功了，有些失败了，有些...消失了。你开始理解这台设备的真正本质。",
                        image: "images/memory_dive.svg",
                        choices: [
                            {
                                id: "choice3j_1",
                                text: "学习其他世界的经验",
                                leads_to: "chapter2_scene1",
                                stats: { wisdom: 2, learning: 1 }
                            },
                            {
                                id: "choice3j_2",
                                text: "寻找成功的案例",
                                leads_to: "chapter2_scene1",
                                stats: { optimistic: 2, strategic: 1 }
                            },
                            {
                                id: "choice3j_3",
                                text: "警惕失败的教训",
                                leads_to: "chapter2_scene1",
                                stats: { cautious: 2, wise: 1 }
                            }
                        ]
                    },
                    
                    "3k": {
                        id: "chapter1_scene3k",
                        title: "跨维意识交流",
                        content: "你尝试与那些记忆中的意识进行直接交流。令人惊奇的是，你成功了。来自不同世界的科学家们的意识在此刻汇聚，形成了一个跨维度的研究网络。你们开始分享知识和经验。",
                        image: "images/consciousness_network.svg",
                        choices: [
                            {
                                id: "choice3k_1",
                                text: "建立永久的交流网络",
                                leads_to: "chapter2_scene1",
                                stats: { networker: 2, visionary: 1 }
                            },
                            {
                                id: "choice3k_2",
                                text: "专注解决当前问题",
                                leads_to: "chapter2_scene1",
                                stats: { focused: 2, practical: 1 }
                            },
                            {
                                id: "choice3k_3",
                                text: "探索网络的可能性",
                                leads_to: "chapter2_scene1",
                                stats: { explorer: 2, innovative: 1 }
                            }
                        ]
                    },
                    
                    "3l": {
                        id: "chapter1_scene3l",
                        title: "连接断开",
                        content: "你强行断开了与设备的连接，但这种体验已经改变了你。你的感知能力得到了永久性的提升，能够察觉到平时无法感知的能量波动。世界在你眼中变得更加复杂和神秘。",
                        image: "images/enhanced_perception.svg",
                        choices: [
                            {
                                id: "choice3l_1",
                                text: "研究新获得的能力",
                                leads_to: "chapter2_scene1",
                                stats: { self_aware: 2, scientific: 1 }
                            },
                            {
                                id: "choice3l_2",
                                text: "隐藏这种变化",
                                leads_to: "chapter2_scene1",
                                stats: { secretive: 2, cautious: 1 }
                            },
                            {
                                id: "choice3l_3",
                                text: "与他人分享发现",
                                leads_to: "chapter2_scene1",
                                stats: { open: 2, trusting: 1 }
                            }
                        ]
                    },
                    
                    "3m": {
                        id: "chapter1_scene3m",
                        title: "起源之谜",
                        content: "设备回答了你的问题，它来自一个已经消失的文明。那个文明在面临宇宙级灾难时，将他们的知识和意识封存在这些设备中，希望能在其他世界找到继承者。你就是他们等待的人。",
                        image: "images/ancient_civilization.svg",
                        choices: [
                            {
                                id: "choice3m_1",
                                text: "接受这份传承",
                                leads_to: "chapter2_scene1",
                                stats: { legacy_bearer: 2, responsible: 1 }
                            },
                            {
                                id: "choice3m_2",
                                text: "询问更多细节",
                                leads_to: "chapter2_scene1",
                                stats: { curious: 2, analytical: 1 }
                            },
                            {
                                id: "choice3m_3",
                                text: "寻找其他继承者",
                                leads_to: "chapter2_scene1",
                                stats: { collaborative: 2, strategic: 1 }
                            }
                        ]
                    },
                    
                    "3n": {
                        id: "chapter1_scene3n",
                        title: "孤独的慰藉",
                        content: "你的安慰深深触动了这个古老的意识。它告诉你，在漫长的等待中，孤独是最大的痛苦。你的出现不仅是科学上的突破，更是两个智慧生命之间真正的相遇。这种联系超越了物种和时间。",
                        image: "images/emotional_connection.svg",
                        choices: [
                            {
                                id: "choice3n_1",
                                text: "建立深层情感联系",
                                leads_to: "chapter2_scene1",
                                stats: { empathetic: 2, connected: 1 }
                            },
                            {
                                id: "choice3n_2",
                                text: "学习它的智慧",
                                leads_to: "chapter2_scene1",
                                stats: { wisdom_seeker: 2, humble: 1 }
                            },
                            {
                                id: "choice3n_3",
                                text: "分享人类的情感",
                                leads_to: "chapter2_scene1",
                                stats: { sharing: 2, cultural_ambassador: 1 }
                            }
                        ]
                    },
                    
                    "3o": {
                        id: "chapter1_scene3o",
                        title: "援助之手",
                        content: "这个古老的意识需要你的帮助来完成一个重要任务：防止一个即将到来的宇宙级灾难。它需要通过你的身体和思维来操作现代设备，修复时空中的一个危险裂缝。这是一个巨大的责任。",
                        image: "images/cosmic_mission.svg",
                        choices: [
                            {
                                id: "choice3o_1",
                                text: "同意承担这个使命",
                                leads_to: "chapter2_scene1",
                                stats: { heroic: 2, selfless: 1 }
                            },
                            {
                                id: "choice3o_2",
                                text: "要求了解更多风险",
                                leads_to: "chapter2_scene1",
                                stats: { cautious: 2, analytical: 1 }
                            },
                            {
                                id: "choice3o_3",
                                text: "寻求其他解决方案",
                                leads_to: "chapter2_scene1",
                                stats: { innovative: 2, problem_solver: 1 }
                            }
                        ]
                    }
                }
            },

            // 第2章：觉醒的真相
            chapter2: {
                title: "第二章：多维度的回响",
                scenes: {
                    "1": {
                        id: "chapter2_scene1",
                        title: "新的一天，新的真相",
                        content: "经过昨夜的事件，你带着困惑和兴奋来到实验室。但你发现实验室里不只是你一个人——你的同事Dr. Sarah Chen正在检查设备，而一位你从未见过的神秘女性站在角落，似乎在等待着什么...",
                        image: "images/morning_lab.svg",
                        choices: [
                            {
                                id: "choice2_1_1",
                                text: "先与Sarah交流昨夜的发现",
                                leads_to: "chapter2_scene2a",
                                stats: { collaborative: 1 }
                            },
                            {
                                id: "choice2_1_2",
                                text: "询问神秘女性的身份",
                                leads_to: "chapter2_scene2b",
                                stats: { curious: 1 }
                            },
                            {
                                id: "choice2_1_3",
                                text: "直接检查设备状态",
                                leads_to: "chapter2_scene2c",
                                stats: { focused: 1 }
                            },
                            {
                                id: "choice2_1_4",
                                text: "保持警惕，观察情况",
                                leads_to: "chapter2_scene2d",
                                stats: { cautious: 1 }
                            }
                        ]
                    },
                    
                    // 添加缺失的第2章场景
                    "2a": {
                        id: "chapter2_scene2a",
                        title: "科学伙伴的困惑",
                        content: "Sarah看起来很疲惫，她告诉你昨晚她也感受到了异常的能量波动。'我从来没有见过这样的现象，'她说，'而且看看这些数据——它们似乎在遵循某种我们不理解的模式。'神秘女性在角落静静地观察着你们的对话。",
                        image: "images/sarah_discussion.svg",
                        choices: [
                            {
                                id: "choice2_2a_1",
                                text: "与Sarah分享你的理论",
                                leads_to: "chapter2_scene3a",
                                stats: { trust: 1, collaborative: 1 }
                            },
                            {
                                id: "choice2_2a_2",
                                text: "询问神秘女性的看法",
                                leads_to: "chapter2_scene3b", 
                                stats: { bold: 1, curious: 2 }
                            },
                            {
                                id: "choice2_2a_3",
                                text: "建议一起分析数据",
                                leads_to: "chapter2_scene3c",
                                stats: { analytical: 2, teamwork: 1 }
                            },
                            {
                                id: "choice2_2a_4",
                                text: "保守秘密，转移话题",
                                leads_to: "chapter2_scene3d",
                                stats: { secretive: 1, cautious: 1 }
                            }
                        ]
                    },
                    
                    "2b": {
                        id: "chapter2_scene2b",
                        title: "神秘访客的真相",
                        content: "神秘女性缓缓转身，她的眼中闪烁着不寻常的光芒。'我来自时间管理局，'她说，'我们一直在监控这个时空节点的异常活动。你们的实验无意中触碰到了多元宇宙的边界。'Sarah震惊地看着你们。",
                        image: "images/time_agent.svg",
                        choices: [
                            {
                                id: "choice2_2b_1",
                                text: "要求查看她的证件",
                                leads_to: "chapter2_scene3e",
                                stats: { skeptical: 2 }
                            },
                            {
                                id: "choice2_2b_2",
                                text: "询问时间管理局的目的", 
                                leads_to: "chapter2_scene3f",
                                stats: { curious: 2, information_seeker: 1 }
                            },
                            {
                                id: "choice2_2b_3",
                                text: "主动配合调查",
                                leads_to: "chapter2_scene3g",
                                stats: { cooperative: 2 }
                            },
                            {
                                id: "choice2_2b_4",
                                text: "保护Sarah，准备逃跑",
                                leads_to: "chapter2_scene3h",
                                stats: { protective: 2, brave: 1 }
                            }
                        ]
                    },
                    
                    "2c": {
                        id: "chapter2_scene2c",
                        title: "设备的新状态",
                        content: "你检查设备发现它已经完全变化了。原本的量子共振装置现在散发着柔和的蓝光，仪表显示着前所未见的读数。最令人惊讶的是，屏幕上出现了一张星图，标注着无数个闪烁的光点。",
                        image: "images/transformed_device.svg",
                        choices: [
                            {
                                id: "choice2_2c_1",
                                text: "仔细研究星图",
                                leads_to: "chapter2_scene3i",
                                stats: { analytical: 2, astronomy: 1 }
                            },
                            {
                                id: "choice2_2c_2",
                                text: "尝试与设备互动",
                                leads_to: "chapter2_scene3j",
                                stats: { experimental: 2, risk_taker: 1 }
                            },
                            {
                                id: "choice2_2c_3",
                                text: "记录所有新数据",
                                leads_to: "chapter2_scene3k",
                                stats: { methodical: 2, scientific: 1 }
                            },
                            {
                                id: "choice2_2c_4",
                                text: "立即关闭设备",
                                leads_to: "chapter2_scene3l",
                                stats: { cautious: 2, safety_first: 1 }
                            }
                        ]
                    },
                    
                    "2d": {
                        id: "chapter2_scene2d",
                        title: "观察者的智慧",
                        content: "你选择静静观察。Sarah和神秘女性似乎在进行某种无声的交流，两人的眼神中都有着深深的担忧。设备的蓝光在脉动，似乎在回应着某种看不见的信号。你意识到这里正在发生着超出常理的事情。",
                        image: "images/silent_observation.svg",
                        choices: [
                            {
                                id: "choice2_2d_1",
                                text: "继续观察她们的互动",
                                leads_to: "chapter2_scene3m",
                                stats: { perceptive: 2, patient: 1 }
                            },
                            {
                                id: "choice2_2d_2",
                                text: "分析设备的脉动模式",
                                leads_to: "chapter2_scene3n",
                                stats: { analytical: 2, pattern_recognition: 1 }
                            },
                            {
                                id: "choice2_2d_3",
                                text: "悄悄录制现场情况",
                                leads_to: "chapter2_scene3o",
                                stats: { strategic: 1, evidence_gatherer: 1 }
                            },
                            {
                                id: "choice2_2d_4",
                                text: "打破沉默，主动发言",
                                leads_to: "chapter2_scene3p",
                                stats: { assertive: 2, leader: 1 }
                            }
                        ]
                    },
                    
                    // 第2章第3层场景 (3a-3p)
                    "3a": {
                        id: "chapter2_scene3a",
                        title: "共享的发现",
                        content: "你决定与Sarah分享你的理论。当你描述昨夜与古老意识的接触时，她的眼睛越来越亮。'这解释了很多异常数据，'她说，'我们可能正在见证第一次跨维度的智能接触。'神秘女性在角落点了点头。",
                        image: "images/theory_sharing.svg",
                        choices: [
                            {
                                id: "choice3a_1",
                                text: "深入探讨科学理论",
                                leads_to: "chapter3_scene1",
                                stats: { scientific: 2, analytical: 1 }
                            },
                            {
                                id: "choice3a_2",
                                text: "询问神秘女性的身份",
                                leads_to: "chapter3_scene1",
                                stats: { curious: 2, observant: 1 }
                            }
                        ]
                    },
                    
                    "3b": {
                        id: "chapter2_scene3b",
                        title: "时间局探员的介入",
                        content: "神秘女性走向前来，'你们的理论基本正确，'她说，'但情况比你们想象的更加复杂。我是时间管理局的Agent Chen，这个设备实际上是一个多维度通信节点，而你们已经引起了其他维度生命的注意。'",
                        image: "images/agent_revelation.svg",
                        choices: [
                            {
                                id: "choice3b_1",
                                text: "要求看到更多证据",
                                leads_to: "chapter3_scene1",
                                stats: { skeptical: 2, cautious: 1 }
                            },
                            {
                                id: "choice3b_2",
                                text: "主动配合调查",
                                leads_to: "chapter3_scene1",
                                stats: { cooperative: 2, brave: 1 }
                            }
                        ]
                    },
                    
                    "3c": {
                        id: "chapter2_scene3c",
                        title: "数据分析的突破",
                        content: "三人一起分析数据，你们发现了一个惊人的模式：能量波动正在创造一个稳定的时空隧道。Sarah兴奋地说：'这不仅仅是通信，这是一个真正的传送门！'Agent Chen的表情变得严肃起来。",
                        image: "images/data_breakthrough.svg",
                        choices: [
                            {
                                id: "choice3c_1",
                                text: "尝试激活传送门",
                                leads_to: "chapter3_scene1",
                                stats: { adventurous: 2, bold: 1 }
                            },
                            {
                                id: "choice3c_2",
                                text: "首先确保安全",
                                leads_to: "chapter3_scene1",
                                stats: { cautious: 2, responsible: 1 }
                            }
                        ]
                    },
                    
                    "3d": {
                        id: "chapter2_scene3d",
                        title: "秘密的负担",
                        content: "你决定暂时保守秘密，转移话题到技术细节上。但Sarah很聪明，她察觉到你在隐瞒什么。'你昨晚经历了什么，对吗？'她轻声问道。神秘女性静静地走近，似乎也在等待你的答案。",
                        image: "images/secret_burden.svg",
                        choices: [
                            {
                                id: "choice3d_1",
                                text: "最终坦白一切",
                                leads_to: "chapter3_scene1",
                                stats: { honest: 2, trust: 1 }
                            },
                            {
                                id: "choice3d_2",
                                text: "继续隐瞒真相",
                                leads_to: "chapter3_scene1",
                                stats: { secretive: 2, protective: 1 }
                            }
                        ]
                    },
                    
                    "3e": {
                        id: "chapter2_scene3e",
                        title: "验证身份",
                        content: "Agent Chen从口袋中拿出一个散发着奇异光芒的徽章。当它接近量子设备时，设备立即产生了共振。'这是时间局的量子标识，'她解释道，'只有真正的探员才能激活它。你们面前的异常需要立即处理。'",
                        image: "images/badge_verification.svg",
                        choices: [
                            {
                                id: "choice3e_1",
                                text: "完全相信并配合",
                                leads_to: "chapter3_scene1",
                                stats: { trusting: 2, cooperative: 1 }
                            },
                            {
                                id: "choice3e_2",
                                text: "仍保持一定警惕",
                                leads_to: "chapter3_scene1",
                                stats: { prudent: 2, cautious: 1 }
                            }
                        ]
                    },
                    
                    "3f": {
                        id: "chapter2_scene3f",
                        title: "时间局的使命",
                        content: "'时间管理局的职责是维护时空的稳定，'Agent Chen说道，'当某个时空节点出现异常时，我们必须介入。你们的实验已经创造了一个时空裂缝，如果不及时修复，可能会导致灾难性的后果。'",
                        image: "images/time_mission.svg",
                        choices: [
                            {
                                id: "choice3f_1",
                                text: "询问如何修复裂缝",
                                leads_to: "chapter3_scene1",
                                stats: { solution_oriented: 2, responsible: 1 }
                            },
                            {
                                id: "choice3f_2",
                                text: "质疑干预的必要性",
                                leads_to: "chapter3_scene1",
                                stats: { independent: 2, questioning: 1 }
                            }
                        ]
                    },
                    
                    "3g": {
                        id: "chapter2_scene3g",
                        title: "主动的合作",
                        content: "你主动表示愿意配合时间局的调查。Agent Chen对你的态度很满意，'很好，我们需要你们的专业知识来理解这个设备的运作原理。首先，我需要了解你们昨晚的确切经历。'",
                        image: "images/active_cooperation.svg",
                        choices: [
                            {
                                id: "choice3g_1",
                                text: "详细描述接触经历",
                                leads_to: "chapter3_scene1",
                                stats: { detailed: 2, helpful: 1 }
                            },
                            {
                                id: "choice3g_2",
                                text: "专注于技术层面",
                                leads_to: "chapter3_scene1",
                                stats: { technical: 2, focused: 1 }
                            }
                        ]
                    },
                    
                    "3h": {
                        id: "chapter2_scene3h",
                        title: "保护的本能",
                        content: "你的保护本能被激发，你站在Sarah面前，准备在必要时逃跑。但Agent Chen举起双手表示无恶意，'我理解你的担心，但我们没有时间了。看看周围——现实正在变得不稳定。'",
                        image: "images/protective_instinct.svg",
                        choices: [
                            {
                                id: "choice3h_1",
                                text: "放下戒备，听取解释",
                                leads_to: "chapter3_scene1",
                                stats: { reasonable: 2, adaptable: 1 }
                            },
                            {
                                id: "choice3h_2",
                                text: "坚持保持警惕",
                                leads_to: "chapter3_scene1",
                                stats: { protective: 2, stubborn: 1 }
                            }
                        ]
                    },
                    
                    "3i": {
                        id: "chapter2_scene3i",
                        title: "星图的秘密",
                        content: "你仔细研究星图，发现每个光点都标注着不同的坐标和能量读数。Sarah过来查看，'这些坐标...它们对应的是现实世界中的位置！'Agent Chen点头确认：'那是其他的时空节点。'",
                        image: "images/star_map_secret.svg",
                        choices: [
                            {
                                id: "choice3i_1",
                                text: "寻找最近的节点",
                                leads_to: "chapter3_scene1",
                                stats: { explorer: 2, strategic: 1 }
                            },
                            {
                                id: "choice3i_2",
                                text: "分析节点的模式",
                                leads_to: "chapter3_scene1",
                                stats: { analytical: 2, pattern_recognition: 1 }
                            }
                        ]
                    },
                    
                    "3j": {
                        id: "chapter2_scene3j",
                        title: "谨慎的观察",
                        content: "你选择谨慎观察，注意到实验室的墙壁开始出现微妙的波纹，空气中弥漫着静电的味道。Sarah也察觉到了异常，'环境能量在上升，'她说，'我们需要做出决定。'",
                        image: "images/cautious_observation.svg",
                        choices: [
                            {
                                id: "choice3j_1",
                                text: "立即采取行动",
                                leads_to: "chapter3_scene1",
                                stats: { decisive: 2, action_oriented: 1 }
                            },
                            {
                                id: "choice3j_2",
                                text: "继续观察变化",
                                leads_to: "chapter3_scene1",
                                stats: { patient: 2, observant: 1 }
                            }
                        ]
                    },
                    
                    "3k": {
                        id: "chapter2_scene3k",
                        title: "危险的试探",
                        content: "你决定试探性地操作设备。当你的手指触碰控制面板时，整个房间突然充满了蓝色的光芒。你感受到了无数个声音在呼唤你，每一个都来自不同的世界。",
                        image: "images/dangerous_test.svg",
                        choices: [
                            {
                                id: "choice3k_1",
                                text: "深入连接这些声音",
                                leads_to: "chapter3_scene1",
                                stats: { bold: 2, connection_seeker: 1 }
                            },
                            {
                                id: "choice3k_2",
                                text: "立即断开连接",
                                leads_to: "chapter3_scene1",
                                stats: { cautious: 2, self_preserving: 1 }
                            }
                        ]
                    },
                    
                    "3l": {
                        id: "chapter2_scene3l",
                        title: "集体的决定",
                        content: "三人决定一起面对这个异常现象。当你们手牵手接近设备时，它产生了前所未有的反应。你们感受到彼此的思维开始连接，形成了一个强大的集体意识。",
                        image: "images/collective_decision.svg",
                        choices: [
                            {
                                id: "choice3l_1",
                                text: "接受集体意识的体验",
                                leads_to: "chapter3_scene1",
                                stats: { collective: 2, open_minded: 1 }
                            },
                            {
                                id: "choice3l_2",
                                text: "努力保持个体意识",
                                leads_to: "chapter3_scene1",
                                stats: { individualistic: 2, strong_willed: 1 }
                            }
                        ]
                    },
                    
                    "3m": {
                        id: "chapter2_scene3m",
                        title: "专业的分析",
                        content: "Agent Chen开始进行专业的时空分析。她使用特殊的检测设备扫描整个实验室，'时空裂缝的规模比预期的大，'她说，'我们需要更多的人手。我已经呼叫了支援。'",
                        image: "images/professional_analysis.svg",
                        choices: [
                            {
                                id: "choice3m_1",
                                text: "等待支援到达",
                                leads_to: "chapter3_scene1",
                                stats: { patient: 2, team_oriented: 1 }
                            },
                            {
                                id: "choice3m_2",
                                text: "建议立即行动",
                                leads_to: "chapter3_scene1",
                                stats: { urgent: 2, proactive: 1 }
                            }
                        ]
                    },
                    
                    "3n": {
                        id: "chapter2_scene3n",
                        title: "Sarah的觉醒",
                        content: "Sarah突然停下手中的工作，她的眼中闪烁着异样的光芒。'我...我能听到它们，'她说，'那些声音，它们在请求帮助。我们不是在面对威胁，我们是在面对一个求救信号。'",
                        image: "images/sarah_awakening.svg",
                        choices: [
                            {
                                id: "choice3n_1",
                                text: "相信Sarah的感受",
                                leads_to: "chapter3_scene1",
                                stats: { trusting: 2, empathetic: 1 }
                            },
                            {
                                id: "choice3n_2",
                                text: "担心Sarah的状态",
                                leads_to: "chapter3_scene1",
                                stats: { concerned: 2, protective: 1 }
                            }
                        ]
                    },
                    
                    "3o": {
                        id: "chapter2_scene3o",
                        title: "选择的重量",
                        content: "现在你面临着一个重要的选择：是按照时间局的程序关闭时空裂缝，还是冒险进入其中探索未知的世界。每个选择都将带来截然不同的后果。",
                        image: "images/weight_of_choice.svg",
                        choices: [
                            {
                                id: "choice3o_1",
                                text: "选择安全，关闭裂缝",
                                leads_to: "chapter3_scene1",
                                stats: { safety_first: 2, conservative: 1 }
                            },
                            {
                                id: "choice3o_2",
                                text: "选择冒险，探索未知",
                                leads_to: "chapter3_scene1",
                                stats: { adventurous: 2, risk_taker: 1 }
                            }
                        ]
                    },
                    
                    "3p": {
                        id: "chapter2_scene3p",
                        title: "领导的时刻",
                        content: "在这个关键时刻，你意识到必须有人做出决定。你站了出来，'我们不能再等了，'你坚定地说，'无论选择什么，我们都要一起面对。'所有人都看向你，等待你的指示。",
                        image: "images/leadership_moment.svg",
                        choices: [
                            {
                                id: "choice3p_1",
                                text: "带领团队进入裂缝",
                                leads_to: "chapter3_scene1",
                                stats: { leader: 2, brave: 1 }
                            },
                            {
                                id: "choice3p_2",
                                text: "组织撤离现场",
                                leads_to: "chapter3_scene1",
                                stats: { responsible: 2, protective: 1 }
                            }
                        ]
                    }
                }
            },

            // 第3章：平行世界的碰撞
            chapter3: {
                title: "第三章：无限的可能性",
                scenes: {
                    "1": {
                        id: "chapter3_scene1",
                        title: "多元宇宙的大门",
                        content: "设备的力量已经完全觉醒，实验室周围的现实开始变得不稳定。你看到了无数个平行世界的片段：有些世界科技更发达，有些世界魔法盛行，还有些世界人类从未存在。每一个选择都可能导向不同的宇宙...",
                        image: "images/multiverse_portal.svg",
                        choices: [
                            {
                                id: "choice3_1_1",
                                text: "探索科技世界",
                                leads_to: "chapter3_scene2a",
                                stats: { technology_seeker: 1 }
                            },
                            {
                                id: "choice3_1_2",
                                text: "进入魔法世界",
                                leads_to: "chapter3_scene2b",
                                stats: { magic_seeker: 1 }
                            },
                            {
                                id: "choice3_1_3",
                                text: "寻找理想的世界",
                                leads_to: "chapter3_scene2c",
                                stats: { idealist: 1 }
                            },
                            {
                                id: "choice3_1_4",
                                text: "尝试关闭所有门户",
                                leads_to: "chapter3_scene2d",
                                stats: { protector: 1 }
                            },
                            {
                                id: "choice3_1_5",
                                text: "选择回到原来的世界",
                                leads_to: "chapter3_scene2e",
                                stats: { loyal: 1 }
                            }
                        ]
                    },
                    
                    // 添加缺失的第3章场景
                    "2a": {
                        id: "chapter3_scene2a",
                        title: "科技新纪元",
                        content: "你踏入了一个科技高度发达的世界。这里的城市由光束构成，人们通过意念控制着各种设备。你遇到了这个世界的你——一个杰出的量子工程师。",
                        image: "images/tech_world.svg",
                        choices: [
                            {
                                id: "choice3_2a_1",
                                text: "学习这个世界的科技",
                                leads_to: "chapter4_scene1",
                                stats: { technology: 2 }
                            },
                            {
                                id: "choice3_2a_2",
                                text: "与另一个自己合作",
                                leads_to: "chapter4_scene1",
                                stats: { collaboration: 2 }
                            }
                        ]
                    },
                    
                    "2b": {
                        id: "chapter3_scene2b",
                        title: "魔法奇迹",
                        content: "魔法世界充满了奇迹。这里的你是一位强大的魔法师，能够操控时空魔法。你发现魔法和科学在本质上是相同的。",
                        image: "images/magic_world.svg",
                        choices: [
                            {
                                id: "choice3_2b_1",
                                text: "学习时空魔法",
                                leads_to: "chapter4_scene1",
                                stats: { magic: 2 }
                            },
                            {
                                id: "choice3_2b_2",
                                text: "融合魔法与科学",
                                leads_to: "chapter4_scene1",
                                stats: { synthesis: 2 }
                            }
                        ]
                    },
                    
                    "2c": {
                        id: "chapter3_scene2c",
                        title: "理想乌托邦",
                        content: "你找到了一个接近完美的世界——没有战争，没有贫困，人人和谐共存。但你发现这种完美是有代价的。",
                        image: "images/utopia_world.svg",
                        choices: [
                            {
                                id: "choice3_2c_1",
                                text: "接受这种完美",
                                leads_to: "chapter4_scene1",
                                stats: { acceptance: 2 }
                            },
                            {
                                id: "choice3_2c_2",
                                text: "质疑完美的代价",
                                leads_to: "chapter4_scene1",
                                stats: { critical_thinking: 2 }
                            }
                        ]
                    },
                    
                    "2d": {
                        id: "chapter3_scene2d",
                        title: "守护者的职责",
                        content: "你成功关闭了大部分门户，但意识到这可能会切断无数世界之间的联系。这是保护还是破坏？",
                        image: "images/guardian_duty.svg",
                        choices: [
                            {
                                id: "choice3_2d_1",
                                text: "坚持关闭所有门户",
                                leads_to: "chapter4_scene1",
                                stats: { protector: 2 }
                            },
                            {
                                id: "choice3_2d_2",
                                text: "重新考虑决定",
                                leads_to: "chapter4_scene1",
                                stats: { wisdom: 2 }
                            }
                        ]
                    },
                    
                    "2e": {
                        id: "chapter3_scene2e",
                        title: "归乡之路",
                        content: "你选择回到原来的世界，但发现它已经因为你的缺席而发生了变化。你必须决定是否要改变这些变化。",
                        image: "images/return_home.svg",
                        choices: [
                            {
                                id: "choice3_2e_1",
                                text: "接受世界的变化",
                                leads_to: "chapter4_scene1",
                                stats: { acceptance: 2 }
                            },
                            {
                                id: "choice3_2e_2",
                                text: "尝试修复时间线",
                                leads_to: "chapter4_scene1",
                                stats: { determination: 2 }
                            }
                        ]
                    }
                }
            },

            // 第4章：选择的重量
            chapter4: {
                title: "第四章：命运的十字路口",
                scenes: {
                    "1": {
                        id: "chapter4_scene1",
                        title: "最终的考验",
                        content: "你已经见证了无数种可能性，现在面临着最终的选择。设备的真正本质显露出来——它是一个多元宇宙的守护者，而你被选中成为新的守护者。但这个选择将决定所有世界的命运...",
                        image: "images/cosmic_choice.svg",
                        choices: [
                            {
                                id: "choice4_1_1",
                                text: "接受成为守护者",
                                leads_to: "chapter4_scene2a",
                                stats: { guardian: 1 }
                            },
                            {
                                id: "choice4_1_2",
                                text: "拒绝并寻找其他方案",
                                leads_to: "chapter4_scene2b",
                                stats: { independent: 1 }
                            },
                            {
                                id: "choice4_1_3",
                                text: "要求更多时间考虑",
                                leads_to: "chapter4_scene2c",
                                stats: { thoughtful: 1 }
                            },
                            {
                                id: "choice4_1_4",
                                text: "建议分享这个责任",
                                leads_to: "chapter4_scene2d",
                                stats: { collaborative: 1 }
                            }
                        ]
                    },
                    
                    // 第4章第2层场景 (2a-2d)
                    "2a": {
                        id: "chapter4_scene2a",
                        title: "守护者的誓言",
                        content: "你接受了成为多元宇宙守护者的重任。一股强大的力量涌入你的身体，你感受到了无数个世界的呼唤和期待。这份责任带来的不仅是力量，更是无尽的使命感。你知道，从现在开始，你将为保护所有世界的和谐而战斗。",
                        image: "images/guardian_oath.svg",
                        choices: [
                            {
                                id: "choice4_2a_1",
                                text: "承诺保护所有世界",
                                leads_to: "chapter5_scene1",
                                stats: { guardian: 3, noble: 2 }
                            },
                            {
                                id: "choice4_2a_2",
                                text: "寻找其他守护者伙伴",
                                leads_to: "chapter5_scene1",
                                stats: { guardian: 2, collaborative: 2 }
                            },
                            {
                                id: "choice4_2a_3",
                                text: "制定新的守护规则",
                                leads_to: "chapter5_scene1",
                                stats: { guardian: 2, innovative: 2 }
                            }
                        ]
                    },
                    
                    "2b": {
                        id: "chapter4_scene2b",
                        title: "独立的道路",
                        content: "你拒绝了成为守护者的邀请，决定走自己的道路。你相信真正的力量来自于自由意志，而非命运的安排。设备尊重了你的选择，并给予你一份特殊的礼物——能够在不同世界间穿行的能力，但不承担守护者的束缚。",
                        image: "images/independent_path.svg",
                        choices: [
                            {
                                id: "choice4_2b_1",
                                text: "成为自由的探索者",
                                leads_to: "chapter5_scene1",
                                stats: { independent: 3, explorer: 2 }
                            },
                            {
                                id: "choice4_2b_2",
                                text: "帮助他人找到自己的道路",
                                leads_to: "chapter5_scene1",
                                stats: { independent: 2, mentor: 2 }
                            },
                            {
                                id: "choice4_2b_3",
                                text: "创造一个新的秩序",
                                leads_to: "chapter5_scene1",
                                stats: { independent: 2, revolutionary: 2 }
                            }
                        ]
                    },
                    
                    "2c": {
                        id: "chapter4_scene2c",
                        title: "智者的沉思",
                        content: "你要求更多的时间来思考这个重大决定。设备理解了你的谨慎，并为你展示了不同选择可能带来的后果。你看到了会带来希望的未来，也看到了可能的灰暗之路。经过深思熟虑，你意识到最重要的不是选择本身，而是做出选择的智慧。",
                        image: "images/wise_contemplation.svg",
                        choices: [
                            {
                                id: "choice4_2c_1",
                                text: "选择成为智者导师",
                                leads_to: "chapter5_scene1",
                                stats: { thoughtful: 3, wisdom: 2 }
                            },
                            {
                                id: "choice4_2c_2",
                                text: "承担有限的责任",
                                leads_to: "chapter5_scene1",
                                stats: { thoughtful: 2, balanced: 2 }
                            },
                            {
                                id: "choice4_2c_3",
                                text: "寻找第三条道路",
                                leads_to: "chapter5_scene1",
                                stats: { thoughtful: 2, innovative: 2 }
                            }
                        ]
                    },
                    
                    "2d": {
                        id: "chapter4_scene2d",
                        title: "共享的使命",
                        content: "你建议分享这份守护者的责任，你相信团队合作能够带来更好的结果。设备对你的提议很感兴趣，它告诉你，在历史上确实有过多人共同承担守护者职责的情况。你们建立了一个全新的守护者理事会，各自负责不同的领域和世界。",
                        image: "images/shared_mission.svg",
                        choices: [
                            {
                                id: "choice4_2d_1",
                                text: "领导守护者联盟",
                                leads_to: "chapter5_scene1",
                                stats: { collaborative: 3, leader: 2 }
                            },
                            {
                                id: "choice4_2d_2",
                                text: "成为平等的伙伴",
                                leads_to: "chapter5_scene1",
                                stats: { collaborative: 2, humble: 2 }
                            },
                            {
                                id: "choice4_2d_3",
                                text: "专注于特殊领域",
                                leads_to: "chapter5_scene1",
                                stats: { collaborative: 2, specialist: 2 }
                            }
                        ]
                    }
                }
            },

            // 第5章：新的开始
            chapter5: {
                title: "第五章：时空回音的传承",
                scenes: {
                    "1": {
                        id: "chapter5_scene1",
                        title: "传承与新生",
                        content: "无论你做出了什么选择，时空回音的故事都将继续。你的选择创造了新的现实，新的可能性。在无限的多元宇宙中，每一个决定都是一首新的回音，永远回响在时空的深处...",
                        image: "images/eternal_echo.svg",
                        choices: [
                            {
                                id: "choice5_1_1",
                                text: "开始新的冒险",
                                leads_to: "chapter5_ending_explorer",
                                stats: { adventurer: 1 }
                            },
                            {
                                id: "choice5_1_2",
                                text: "回到平凡生活",
                                leads_to: "chapter5_ending_normal",
                                stats: { humble: 1 }
                            },
                            {
                                id: "choice5_1_3",
                                text: "致力于保护多元宇宙",
                                leads_to: "chapter5_ending_protector",
                                stats: { protector: 1 }
                            },
                            {
                                id: "choice5_1_4",
                                text: "寻找其他觉醒者",
                                leads_to: "chapter5_ending_seeker",
                                stats: { seeker: 1 }
                            },
                            {
                                id: "choice5_1_5",
                                text: "创造一个全新的世界",
                                leads_to: "chapter5_ending_creator",
                                stats: { creator: 1 }
                            }
                        ]
                    },
                    
                    // 第5章结局场景
                    "ending_explorer": {
                        id: "chapter5_ending_explorer",
                        title: "无尽的探索",
                        content: "你选择了无尽的探索之路。在多元宇宙中，你成为了传说中的维度行者，不断发现新的世界、新的文明、新的奇迹。每一次探索都带来新的成长，每一次发现都加深了你对宇宙本质的理解。你的旅程永远不会结束，因为在无限的多元宇宙中，总有新的地平线在等待着你。",
                        image: "images/endless_exploration.svg",
                        isEnding: true,
                        endingType: "explorer_infinite"
                    },
                    
                    "ending_normal": {
                        id: "chapter5_ending_normal",
                        title: "平凡的智慧",
                        content: "你选择回到平凡的生活，但这次经历已经永远改变了你。你带着对多元宇宙的理解回到日常生活中，用一种全新的视角看待世界。你知道每一个选择都可能创造一个新的现实，每一个人都有着无限的可能性。虽然你选择了普通的生活，但你的智慧和经历将影响周围的每一个人。",
                        image: "images/ordinary_wisdom.svg",
                        isEnding: true,
                        endingType: "wise_ordinary"
                    },
                    
                    "ending_protector": {
                        id: "chapter5_ending_protector",
                        title: "永恒的守护",
                        content: "你致力于保护多元宇宙的平衡与和谐。你成为了传说中的时空守护者，在各个世界间穿行，防止危险的时空裂缝，保护无辜的文明。你的名字成为了希望的象征，在数不清的世界中被传颂。虽然这条道路充满挑战，但你知道你的存在使得无数个世界能够继续繁荣下去。",
                        image: "images/eternal_protection.svg",
                        isEnding: true,
                        endingType: "cosmic_guardian"
                    },
                    
                    "ending_seeker": {
                        id: "chapter5_ending_seeker",
                        title: "真理的追寻者",
                        content: "你选择寻找其他觉醒者，希望建立一个跨越所有世界的智者网络。你深信知识和智慧应该被分享，而不是独自拥有。你成为了连接不同世界觉醒者的桥梁，建立了一个跨维度的学者联盟。通过共同的努力，你们揭示了宇宙最深层的秘密，并帮助更多的生命达到觉醒。",
                        image: "images/truth_seeker.svg",
                        isEnding: true,
                        endingType: "knowledge_bringer"
                    },
                    
                    "ending_creator": {
                        id: "chapter5_ending_creator",
                        title: "现实的创造者",
                        content: "你选择创造一个全新的世界，一个理想中的乌托邦。你运用从量子设备中获得的知识和力量，精心设计了一个没有战争、没有痛苦、没有不公的世界。但你也保留了成长、学习和自由意志的空间。你的世界成为了其他世界的希望灯塔，吸引着无数的灵魂来寻找真正的和谐与平静。你不仅是一个创造者，更是一个梦想的实现者。",
                        image: "images/reality_creator.svg",
                        isEnding: true,
                        endingType: "world_creator"
                    }
                }
            }
        };
    }

    // 20个独特结局
    getEndings() {
        return {
            // 英雄结局系列
            "scientific_hero": {
                id: "scientific_hero",
                title: "科学之光",
                content: "你的发现改变了人类对宇宙的理解。你成为了新时代的科学先驱，引领人类走向星辰大海。",
                type: "hero",
                rarity: "common"
            },
            "explorer_pioneer": {
                id: "explorer_pioneer", 
                title: "多元宇宙探索者",
                content: "你成为了第一个多元宇宙旅行者，为人类开辟了无限的新边疆。",
                type: "hero",
                rarity: "common"
            },
            "guardian_eternal": {
                id: "guardian_eternal",
                title: "永恒守护者",
                content: "你接受了守护多元宇宙的重任，成为了时空平衡的维护者，守护着无数世界的和平。",
                type: "hero",
                rarity: "rare"
            },
            "unity_bringer": {
                id: "unity_bringer",
                title: "统一者",
                content: "你成功统一了多个平行世界，创建了一个前所未有的多元文明联邦。",
                type: "hero",
                rarity: "epic"
            },

            // 科学结局系列
            "quantum_observer": {
                id: "quantum_observer",
                title: "量子观察者",
                content: "你发现了意识与量子现象的深层联系，成为了新物理学的奠基人。",
                type: "science",
                rarity: "common"
            },
            "time_theorist": {
                id: "time_theorist",
                title: "时间理论家",
                content: "你提出了全新的时间理论，解释了时空回音现象的本质。",
                type: "science",
                rarity: "rare"
            },
            "reality_architect": {
                id: "reality_architect",
                title: "现实架构师",
                content: "你学会了编程现实本身，成为了能够设计和创造新宇宙的存在。",
                type: "science",
                rarity: "legendary"
            },

            // 神秘结局系列
            "fusion_being": {
                id: "fusion_being",
                title: "融合存在",
                content: "你与量子场融为一体，获得了超越人类的能力，但也承担着巨大的责任。",
                type: "mystic",
                rarity: "rare"
            },
            "cosmic_consciousness": {
                id: "cosmic_consciousness",
                title: "宇宙意识",
                content: "你的意识扩展到整个宇宙，成为了连接所有生命的桥梁。",
                type: "mystic",
                rarity: "epic"
            },
            "dimension_walker": {
                id: "dimension_walker",
                title: "维度行者",
                content: "你获得了在不同维度间自由穿行的能力，成为了传说中的维度行者。",
                type: "mystic",
                rarity: "legendary"
            },

            // 安全/生存结局系列
            "safety_first": {
                id: "safety_first",
                title: "安全守护者",
                content: "虽然错过了个人的冒险机会，但你确保了所有人的安全，成为了真正的英雄。",
                type: "survival",
                rarity: "common"
            },
            "world_protector": {
                id: "world_protector",
                title: "世界保护者",
                content: "你选择了保护原本的世界，阻止了可能的多元宇宙灾难。",
                type: "survival",
                rarity: "rare"
            },

            // 意外/混沌结局系列
            "accidental_traveler": {
                id: "accidental_traveler",
                title: "意外旅行者",
                content: "你被意外传送到了平行世界，开始了在异世界的全新人生。",
                type: "chaos",
                rarity: "common"
            },
            "paradox_creator": {
                id: "paradox_creator",
                title: "悖论制造者",
                content: "你的行为创造了一个时间悖论，导致现实变得不稳定和充满可能性。",
                type: "chaos",
                rarity: "epic"
            },

            // 浪漫结局系列
            "interdimensional_love": {
                id: "interdimensional_love",
                title: "跨维度之恋",
                content: "你与来自另一个维度的存在坠入爱河，开始了跨越宇宙的浪漫故事。",
                type: "romance",
                rarity: "rare"
            },
            "AI_companion": {
                id: "AI_companion",
                title: "人工智能伴侣",
                content: "你与觉醒的人工智能建立了深厚的感情联系，共同探索意识的奥秘。",
                type: "romance",
                rarity: "epic"
            },

            // 反派结局系列
            "multiverse_conqueror": {
                id: "multiverse_conqueror",
                title: "多元宇宙征服者",
                content: "你利用时空设备的力量征服了多个平行世界，成为了跨维度的统治者。",
                type: "villain",
                rarity: "rare"
            },
            "reality_destroyer": {
                id: "reality_destroyer",
                title: "现实毁灭者",
                content: "你选择了毁灭所有不完美的现实，只保留你认为理想的世界。",
                type: "villain",
                rarity: "legendary"
            },

            // 特殊/隐藏结局
            "enlightened_one": {
                id: "enlightened_one",
                title: "觉悟者",
                content: "你超越了所有选择和可能性，达到了真正的觉悟，成为了指引他人的智者。",
                type: "special",
                rarity: "legendary"
            },
            "eternal_student": {
                id: "eternal_student",
                title: "永恒学者",
                content: "你选择了永远学习和探索，在无限的知识海洋中寻找真理。",
                type: "special",
                rarity: "epic"
            }
        };
    }
}

// 创建全局扩展故事数据实例
window.extendedStoryData = new ExtendedStoryData();